﻿using System.IO;

namespace TraditionalMalteseCuisine.App_Code.Functions
{
    public class IO_Functions
    {
        public static void VerifyFilePath(string filePath)
        {
            if (!DoesFileExists(filePath))
                File.Create(filePath);
        }

        public static bool DoesFileExists(string filePath)
        {
            return File.Exists(filePath);
        }

        public static bool DeleteFile(string filePath)
        {
            try
            {
                if (DoesFileExists(filePath))
                    File.Delete(filePath);
                else
                    return false;
            }
            catch { }

            return true;
        }
    }
}